\section{Software Architecture}

The SAL-T software can be categorized into a central transmission part, the glue code to the consumer (the SAL) and the glue code to the producer (the SRB \cite{SRB}). This section outlines those parts in order to give the reader a brief overview of the internal architecture, supported by UML diagrams.

\subsection{Transmission of data}

\begin{figure}[!h]
 \centering
 \includegraphics[width=\textwidth]{figures/Transmission.pdf}
 % Transmission.pdf: 929x783 pixel, 72dpi, 32.77x27.62 cm, bb=0 0 929 783
 \caption{Transmission}
 \label{fig:transmission}
\end{figure}

The transmission of data into and out of DataTurbine is handled by the five classes shown in \autoref{fig:transmission}. The central class is the DataTurbineConnector. It defines general methods to access DataTurbine and the specific channels within it. The two classes for read and write access - DataTurbineWriteConnector and DataTurbineReadConnector - are derived from this class. They are used by other parts of the software to have easy use of read and write functionality to DataTurbine. For example, the Receiver and Sender classes use their respective counterparts to profit from these simple interfaces to DataTurbine.

\subsection{Transmittable Object}

\begin{figure}[!h]
 \centering
 \includegraphics[width=0.6\textwidth]{figures/Transmittable.pdf}
 % Transmittable.pdf: 451x488 pixel, 72dpi, 15.91x17.22 cm, bb=0 0 451 488
 \caption{Transmittable Object}
 \label{fig:transmittable}
\end{figure}

All communication through DataTurbine is based on sending and receiving Transmittable objects (see \autoref{fig:transmittable}). The Transmittable class focuses on enhancability to provide better maintainability as a non functional quality for software (see \cite{iso9126}). To do so, it provides the capability to attach metadata information to the actual sensor data.

\subsection{The Producer classes}

\begin{figure}[!h]
 \centering
 \includegraphics[width=\textwidth]{figures/Producer.pdf}
 % Producer.pdf: 829x594 pixel, 72dpi, 29.25x20.95 cm, bb=0 0 829 594
 \caption{Producer}
 \label{fig:producer}
\end{figure}

The producer classes (see \autoref{fig:producer}) are those classes, which are take the main part in handling the connection between SAL and DataTurbine. On one side, the SaltRmiClient establishes the connection to SAL, while opening a SensorThread for each sensor type. The SensorThreads use the Sender class to then push the data into the DataTurbine.

\subsection{The Consumer classes}

\begin{figure}[!h]
 \centering
 \includegraphics[width=\textwidth]{figures/Consumer.pdf}
 % Consumer.pdf: 816x573 pixel, 72dpi, 28.79x20.21 cm, bb=0 0 816 573
 \caption{Consumer}
 \label{fig:consumer}
\end{figure}

Within the consumer classes (see \autoref{fig:consumer}) most of the logic for the connection between DataTurbine and SRB is implemented. While the SaltSRBClient uses the SRBConnection class to connect to SRB, it opens multiple TurbineReceiverThreads to read from all SAL-T related channels inside the DataTurbine.



